pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut i = 2; // 已经有2个元素
    let mut fib = vec![0, 1];
    let mut sum = 1;

    // 生成大小确定的斐波那契数列并计算奇数和
    while fib[i - 1] + fib[i - 2] < threshold {
        fib.push(fib[i - 1] + fib[i - 2]);
        if fib[i] % 2 != 0 {
            sum += fib[i];
        }
        i += 1;
    }
    sum
}
